//
//  LSZCategoriesChoiceCVCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/13.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZCategoriesChoiceCVCell.h"

@implementation LSZCategoriesChoiceCVCell
-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageViewOne = [[UIImageView alloc]init];
        self.imageViewOne.image = [UIImage imageNamed:@"单曲排行"];
        [self addSubview:self.imageViewOne];

        self.labelOne = [[UILabel alloc]init];
        self.labelOne.text = @"单曲排行";
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelOne font:13.5];
        self.labelOne.textColor = titleColorLSZ;
        self.labelOne.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.labelOne];

        self.imageViewTwo = [[UIImageView alloc]init];
        self.imageViewTwo.image = [UIImage imageNamed:@"音频_歌手"];
        [self addSubview:self.imageViewTwo];
        self.labelTwo = [[UILabel alloc]init];
        self.labelTwo.text = @"歌手";
        self.labelTwo.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelTwo font:13.5];
        self.labelTwo.textColor = titleColorLSZ;
        [self addSubview:self.labelTwo];

        self.imageViewThree = [[UIImageView alloc]init];
        self.imageViewThree.image = [UIImage imageNamed:@"音频_专辑"];
        [self addSubview:self.imageViewThree];
        self.labelThree = [[UILabel alloc]init];
        self.labelThree.text = @"专辑";
        self.labelThree.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelThree font:13.5];
        self.labelThree.textColor = titleColorLSZ;
        [self addSubview:self.labelThree];

        self.imageViewFour = [[UIImageView alloc]init];
        self.imageViewFour.image = [UIImage imageNamed:@"音频_福音电台"];
        [self addSubview:self.imageViewFour];
        self.labelFour = [[UILabel alloc]init];
        self.labelFour.text = @"福音电台";
        self.labelFour.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelFour font:13.5];
        self.labelFour.textColor = titleColorLSZ;
        [self addSubview:self.labelFour];

        self.imageViewFive = [[UIImageView alloc]init];
        self.imageViewFive.image = [UIImage imageNamed:@"我的音乐"];
        [self addSubview:self.imageViewFive];

        self.labelFive = [[UILabel alloc]init];
        self.labelFive.text = @"我的音乐";
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelFive font:13.5];
        self.labelFive.textColor = titleColorLSZ;
        self.labelFive.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.labelFive];

        self.imageViewSix = [[UIImageView alloc]init];
        self.imageViewSix.image = [UIImage imageNamed:@"音频_下载"];
        [self addSubview:self.imageViewSix];
        self.labelSix = [[UILabel alloc]init];
        self.labelSix.text = @"本地下载";
        self.labelSix.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelSix font:13.5];
        self.labelSix.textColor = titleColorLSZ;
        [self addSubview:self.labelSix];

        self.imageViewSeven = [[UIImageView alloc]init];
        self.imageViewSeven.image = [UIImage imageNamed:@"音频讲道"];
        [self addSubview:self.imageViewSeven];
        self.labelSeven = [[UILabel alloc]init];
        self.labelSeven.text = @"音频讲道";
        self.labelSeven.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelSeven font:13.5];
        self.labelSeven.textColor = titleColorLSZ;
        [self addSubview:self.labelSeven];

        self.imageViewEight = [[UIImageView alloc]init];
        self.imageViewEight.image = [UIImage imageNamed:@"精品MV"];
        [self addSubview:self.imageViewEight];
        self.labelEight = [[UILabel alloc]init];
        self.labelEight.text = @"福音MV";
        self.labelEight.textAlignment = NSTextAlignmentCenter;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelEight font:13.5];
        self.labelEight.textColor = titleColorLSZ;
        [self addSubview:self.labelEight];

        if (ScreenWidth == 320) {
            //5
            self.imageViewOne.frame = CGRectMake(10, 10, ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewTwo.frame = CGRectMake(10+ScreenWidth/4, 10, ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewThree.frame = CGRectMake(10+ScreenWidth/2, 10, ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewFour.frame = CGRectMake(10+ScreenWidth/4*3, 10, ScreenWidth/4-20, ScreenWidth/4-20);

            self.labelOne.frame = CGRectMake(CGRectGetMinX(self.imageViewOne.frame), CGRectGetMaxY(self.imageViewOne.frame)+5, self.imageViewOne.frame.size.width, 16);
            self.labelTwo.frame = CGRectMake(CGRectGetMinX(self.imageViewTwo.frame), CGRectGetMaxY(self.imageViewTwo.frame)+5, self.imageViewTwo.frame.size.width, 16);
            self.labelThree.frame = CGRectMake(CGRectGetMinX(self.imageViewThree.frame), CGRectGetMaxY(self.imageViewThree.frame)+5, self.imageViewOne.frame.size.width, 16);
            self.labelFour.frame = CGRectMake(CGRectGetMinX(self.imageViewFour.frame), CGRectGetMaxY(self.imageViewFour.frame)+5, self.imageViewFour.frame.size.width, 16);

            self.imageViewFive.frame = CGRectMake(10, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewSix.frame = CGRectMake(10+ScreenWidth/4, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewSeven.frame = CGRectMake(10+ScreenWidth/2, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-20, ScreenWidth/4-20);
            self.imageViewEight.frame = CGRectMake(10+ScreenWidth/4*3, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-20, ScreenWidth/4-20);
            self.labelFive.frame = CGRectMake(CGRectGetMinX(self.imageViewFive.frame), CGRectGetMaxY(self.imageViewFive.frame)+5, self.imageViewFive.frame.size.width, 16);
            self.labelSix.frame = CGRectMake(CGRectGetMinX(self.imageViewSix.frame), CGRectGetMaxY(self.imageViewSix.frame)+5, self.imageViewSix.frame.size.width, 16);
            self.labelSeven.frame = CGRectMake(CGRectGetMinX(self.imageViewSeven.frame), CGRectGetMaxY(self.imageViewSeven.frame)+5, self.imageViewSeven.frame.size.width, 16);
            self.labelEight.frame = CGRectMake(CGRectGetMinX(self.imageViewEight.frame), CGRectGetMaxY(self.imageViewEight.frame)+5, self.imageViewEight.frame.size.width, 16);
        }else if(ScreenWidth == 375){
            // 6 7
            self.imageViewOne.frame = CGRectMake(15, 10, ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewTwo.frame = CGRectMake(15+ScreenWidth/4, 10, ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewThree.frame = CGRectMake(15+ScreenWidth/2, 10, ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewFour.frame = CGRectMake(15+ScreenWidth/4*3, 10, ScreenWidth/4-30, ScreenWidth/4-30);
            self.labelOne.frame = CGRectMake(CGRectGetMinX(self.imageViewOne.frame), CGRectGetMaxY(self.imageViewOne.frame)+5, self.imageViewOne.frame.size.width, 18);
            self.labelTwo.frame = CGRectMake(CGRectGetMinX(self.imageViewTwo.frame), CGRectGetMaxY(self.imageViewTwo.frame)+5, self.imageViewTwo.frame.size.width, 18);
            self.labelThree.frame = CGRectMake(CGRectGetMinX(self.imageViewThree.frame), CGRectGetMaxY(self.imageViewThree.frame)+5, self.imageViewOne.frame.size.width, 18);
            self.labelFour.frame = CGRectMake(CGRectGetMinX(self.imageViewFour.frame), CGRectGetMaxY(self.imageViewFour.frame)+5, self.imageViewFour.frame.size.width, 18);

            self.imageViewFive.frame = CGRectMake(15, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewSix.frame = CGRectMake(15+ScreenWidth/4, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewSeven.frame = CGRectMake(15+ScreenWidth/2, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-30, ScreenWidth/4-30);
            self.imageViewEight.frame = CGRectMake(15+ScreenWidth/4*3, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-30, ScreenWidth/4-30);
            self.labelFive.frame = CGRectMake(CGRectGetMinX(self.imageViewFive.frame), CGRectGetMaxY(self.imageViewFive.frame)+5, self.imageViewFive.frame.size.width, 18);
            self.labelSix.frame = CGRectMake(CGRectGetMinX(self.imageViewSix.frame), CGRectGetMaxY(self.imageViewSix.frame)+5, self.imageViewSix.frame.size.width, 18);
            self.labelSeven.frame = CGRectMake(CGRectGetMinX(self.imageViewSeven.frame), CGRectGetMaxY(self.imageViewSeven.frame)+5, self.imageViewSeven.frame.size.width, 18);
            self.labelEight.frame = CGRectMake(CGRectGetMinX(self.imageViewEight.frame), CGRectGetMaxY(self.imageViewEight.frame)+5, self.imageViewEight.frame.size.width, 18);
        }else {
            //plus
            self.imageViewOne.frame = CGRectMake(20, 10, ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewTwo.frame = CGRectMake(20+ScreenWidth/4, 10, ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewThree.frame = CGRectMake(20+ScreenWidth/2, 10, ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewFour.frame = CGRectMake(20+ScreenWidth/4*3, 10, ScreenWidth/4-40, ScreenWidth/4-40);
            self.labelOne.frame = CGRectMake(CGRectGetMinX(self.imageViewOne.frame), CGRectGetMaxY(self.imageViewOne.frame)+5, self.imageViewOne.frame.size.width, 20);
            self.labelTwo.frame = CGRectMake(CGRectGetMinX(self.imageViewTwo.frame), CGRectGetMaxY(self.imageViewTwo.frame)+5, self.imageViewTwo.frame.size.width, 20);
            self.labelThree.frame = CGRectMake(CGRectGetMinX(self.imageViewThree.frame), CGRectGetMaxY(self.imageViewThree.frame)+5, self.imageViewOne.frame.size.width, 20);
            self.labelFour.frame = CGRectMake(CGRectGetMinX(self.imageViewFour.frame), CGRectGetMaxY(self.imageViewFour.frame)+5, self.imageViewFour.frame.size.width, 20);

            self.imageViewFive.frame = CGRectMake(20, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewSix.frame = CGRectMake(20+ScreenWidth/4, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewSeven.frame = CGRectMake(20+ScreenWidth/2, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-40, ScreenWidth/4-40);
            self.imageViewEight.frame = CGRectMake(20+ScreenWidth/4*3, 10+CGRectGetMaxY(self.labelOne.frame), ScreenWidth/4-40, ScreenWidth/4-40);
            self.labelFive.frame = CGRectMake(CGRectGetMinX(self.imageViewFive.frame), CGRectGetMaxY(self.imageViewFive.frame)+5, self.imageViewFive.frame.size.width, 20);
            self.labelSix.frame = CGRectMake(CGRectGetMinX(self.imageViewSix.frame), CGRectGetMaxY(self.imageViewSix.frame)+5, self.imageViewSix.frame.size.width, 20);
            self.labelSeven.frame = CGRectMake(CGRectGetMinX(self.imageViewSeven.frame), CGRectGetMaxY(self.imageViewSeven.frame)+5, self.imageViewSeven.frame.size.width, 20);
            self.labelEight.frame = CGRectMake(CGRectGetMinX(self.imageViewEight.frame), CGRectGetMaxY(self.imageViewEight.frame)+5, self.imageViewEight.frame.size.width, 20);
        }
    }
    return self;
}
@end
